package com.example.book;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

@Service
public class BookService {
    @Autowired(required = false) //是否必须注入
    @Qualifier(value = "bookRepository2") //指定装配哪一个bean
    private BookRepository bookRepository;
}


